Release 10.1A: OpenEdge Development:
ADM and SmartObjects
SmartLink events
For each SmartLink type, the source and target objects have specific responsibilities to each other. These responsibilities are fulfilled by the methods contained in the SmartObject; therefore, the type of links a particular SmartObject can support is determined by the methods it contains.
The specific responsibilities of a pair of linked SmartObjects to each other depend only on the type of SmartLink that connects them, not on their object types. For example, in a TableIO relationship, the target object always has the same responsibilities, regardless of whether it is a SmartDataBrowser or a SmartDataViewer. Specifically:
- A source object
PUBLISHes named events to which its target object mustSUBSCRIBEand for which the target object must implement event procedures that execute whenPUBLISHEDevents occur.- The target object
PUBLISHes named events to which its source object mustSUBSCRIBEand for which the source object must implement event procedures that execute whenPUBLISHed events occur.The source and target objects, therefore, must
SUBSCRIBEto the correct set of events, or they cannot interact as expected. These events evaluate to the internal procedures in the source and target objects.Subscription occurs when you add the SmartLink: the addLink procedure (in
smart.p)SUBSCRIBEs the target procedure to the SourceEvents for the link andSUBSCRIBEs the source procedure to the TargetEvents, as shown in the following code fragment:
This behavior happens automatically, in the
addLinkprocedure.For more information on
PUBLISHandSUBSCRIBE, see OpenEdge Development: Progress 4GL Handbook or OpenEdge Development: Progress 4GL Reference . For a description of dynamic-function, see OpenEdge Development: Progress 4GL Reference .The following sections describe the responsibilities of the source and target SmartObjects for each ADM-recognized SmartLink type. For each SmartLink type, these sections also list the subscribed events/internal procedures required by the source and target objects.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |